package com.jiangxiaofei.citycloud.bean;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.List;

/**
 * 作者: JiangXfei
 * 日期: 2017/9/21 0021
 */

public class ParkBean implements Parcelable {

    /**
     * status : 0
     * message : 操作成功！
     * twoKilometreParkList : [{"parkSeq":146704,"parkName":"青岛新兴医院停车场","parkClass":"2","parkAddress":"四方区西吴路175号","lng":120.378775,"lat":36.100151,"vacancyNum":4,"price":0,"reservePrice":0,"distance":165.73310061627043,"isReserve":2,"chargeDescription":"不对外开放","isVip":"1","priceType":1,"isReserveFull":null},{"parkSeq":148125,"parkName":"青岛市市北区中医院停车场","parkClass":"2","parkAddress":"市北区鞍山路86号","lng":120.378685,"lat":36.101209,"vacancyNum":5,"price":0,"reservePrice":0,"distance":203.64797644787564,"isReserve":2,"chargeDescription":"不对外开放","isVip":"1","priceType":1,"isReserveFull":null},{"parkSeq":145809,"parkName":"敦化路70号停车场","parkClass":"2","parkAddress":"市北区敦化路70号","lng":120.377634,"lat":36.097534,"vacancyNum":6,"price":4,"reservePrice":0,"distance":286.1862960033791,"isReserve":2,"chargeDescription":"每小时4元，最高32元。","isVip":"1","priceType":1,"isReserveFull":null},{"parkSeq":145765,"parkName":"中锦大厦停车场","parkClass":"2","parkAddress":"市北区敦化路68号","lng":120.377463,"lat":36.097425,"vacancyNum":19,"price":6,"reservePrice":0,"distance":295.16775150937036,"isReserve":2,"chargeDescription":"每小时6元，最高48元。","isVip":"1","priceType":1,"isReserveFull":null},{"parkSeq":146682,"parkName":"东广场商务楼停车场","parkClass":"2","parkAddress":"四方区镇江北路56号","lng":120.373581,"lat":36.099838,"vacancyNum":2,"price":6,"reservePrice":0,"distance":302.21605839165323,"isReserve":2,"chargeDescription":"每小时6元，最高48元。","isVip":"1","priceType":1,"isReserveFull":null},{"parkSeq":145907,"parkName":"中苑多一点美食广场停车场","parkClass":"2","parkAddress":"市北区山东路128号","lng":120.379628,"lat":36.098416,"vacancyNum":9,"price":8,"reservePrice":0,"distance":302.24465450031386,"isReserve":2,"chargeDescription":"每小时8元，最高64元。","isVip":"1","priceType":1,"isReserveFull":null}]
     * twoKilometreAwayParkList : null
     * moreParkingInfo : null
     * page : null
     */

    private int status;
    private String message;
    private Object twoKilometreAwayParkList;
    private Object moreParkingInfo;
    private Object page;
    private List<TwoKilometreParkListBean> twoKilometreParkList;

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public Object getTwoKilometreAwayParkList() {
        return twoKilometreAwayParkList;
    }

    public void setTwoKilometreAwayParkList(Object twoKilometreAwayParkList) {
        this.twoKilometreAwayParkList = twoKilometreAwayParkList;
    }

    public Object getMoreParkingInfo() {
        return moreParkingInfo;
    }

    public void setMoreParkingInfo(Object moreParkingInfo) {
        this.moreParkingInfo = moreParkingInfo;
    }

    public Object getPage() {
        return page;
    }

    public void setPage(Object page) {
        this.page = page;
    }

    public List<TwoKilometreParkListBean> getTwoKilometreParkList() {
        return twoKilometreParkList;
    }

    public void setTwoKilometreParkList(List<TwoKilometreParkListBean> twoKilometreParkList) {
        this.twoKilometreParkList = twoKilometreParkList;
    }

    public static class TwoKilometreParkListBean implements Parcelable {
        /**
         * parkSeq : 146704
         * parkName : 青岛新兴医院停车场
         * parkClass : 2
         * parkAddress : 四方区西吴路175号
         * lng : 120.378775
         * lat : 36.100151
         * vacancyNum : 4
         * price : 0
         * reservePrice : 0
         * distance : 165.73310061627043
         * isReserve : 2
         * chargeDescription : 不对外开放
         * isVip : 1
         * priceType : 1
         * isReserveFull : null
         */

        private int parkSeq;
        private String parkName;
        private String parkClass;
        private String parkAddress;
        private double lng;
        private double lat;
        private int vacancyNum;
        private int price;
        private int reservePrice;
        private double distance;
        private int isReserve;
        private String chargeDescription;
        private String isVip;
        private int priceType;
        private Object isReserveFull;

        public int getParkSeq() {
            return parkSeq;
        }

        public void setParkSeq(int parkSeq) {
            this.parkSeq = parkSeq;
        }

        public String getParkName() {
            return parkName;
        }

        public void setParkName(String parkName) {
            this.parkName = parkName;
        }

        public String getParkClass() {
            return parkClass;
        }

        public void setParkClass(String parkClass) {
            this.parkClass = parkClass;
        }

        public String getParkAddress() {
            return parkAddress;
        }

        public void setParkAddress(String parkAddress) {
            this.parkAddress = parkAddress;
        }

        public double getLng() {
            return lng;
        }

        public void setLng(double lng) {
            this.lng = lng;
        }

        public double getLat() {
            return lat;
        }

        public void setLat(double lat) {
            this.lat = lat;
        }

        public int getVacancyNum() {
            return vacancyNum;
        }

        public void setVacancyNum(int vacancyNum) {
            this.vacancyNum = vacancyNum;
        }

        public int getPrice() {
            return price;
        }

        public void setPrice(int price) {
            this.price = price;
        }

        public int getReservePrice() {
            return reservePrice;
        }

        public void setReservePrice(int reservePrice) {
            this.reservePrice = reservePrice;
        }

        public double getDistance() {
            return distance;
        }

        public void setDistance(double distance) {
            this.distance = distance;
        }

        public int getIsReserve() {
            return isReserve;
        }

        public void setIsReserve(int isReserve) {
            this.isReserve = isReserve;
        }

        public String getChargeDescription() {
            return chargeDescription;
        }

        public void setChargeDescription(String chargeDescription) {
            this.chargeDescription = chargeDescription;
        }

        public String getIsVip() {
            return isVip;
        }

        public void setIsVip(String isVip) {
            this.isVip = isVip;
        }

        public int getPriceType() {
            return priceType;
        }

        public void setPriceType(int priceType) {
            this.priceType = priceType;
        }

        public Object getIsReserveFull() {
            return isReserveFull;
        }

        public void setIsReserveFull(Object isReserveFull) {
            this.isReserveFull = isReserveFull;
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeInt(this.parkSeq);
            dest.writeString(this.parkName);
            dest.writeString(this.parkClass);
            dest.writeString(this.parkAddress);
            dest.writeDouble(this.lng);
            dest.writeDouble(this.lat);
            dest.writeInt(this.vacancyNum);
            dest.writeInt(this.price);
            dest.writeInt(this.reservePrice);
            dest.writeDouble(this.distance);
            dest.writeInt(this.isReserve);
            dest.writeString(this.chargeDescription);
            dest.writeString(this.isVip);
            dest.writeInt(this.priceType);
            dest.writeParcelable((Parcelable) this.isReserveFull, flags);
        }

        public TwoKilometreParkListBean() {
        }

        protected TwoKilometreParkListBean(Parcel in) {
            this.parkSeq = in.readInt();
            this.parkName = in.readString();
            this.parkClass = in.readString();
            this.parkAddress = in.readString();
            this.lng = in.readDouble();
            this.lat = in.readDouble();
            this.vacancyNum = in.readInt();
            this.price = in.readInt();
            this.reservePrice = in.readInt();
            this.distance = in.readDouble();
            this.isReserve = in.readInt();
            this.chargeDescription = in.readString();
            this.isVip = in.readString();
            this.priceType = in.readInt();
            this.isReserveFull = in.readParcelable(Object.class.getClassLoader());
        }

        public static final Parcelable.Creator<TwoKilometreParkListBean> CREATOR = new Parcelable.Creator<TwoKilometreParkListBean>() {
            @Override
            public TwoKilometreParkListBean createFromParcel(Parcel source) {
                return new TwoKilometreParkListBean(source);
            }

            @Override
            public TwoKilometreParkListBean[] newArray(int size) {
                return new TwoKilometreParkListBean[size];
            }
        };
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(this.status);
        dest.writeString(this.message);
        dest.writeParcelable((Parcelable) this.twoKilometreAwayParkList, flags);
        dest.writeParcelable((Parcelable) this.moreParkingInfo, flags);
        dest.writeParcelable((Parcelable) this.page, flags);
        dest.writeTypedList(this.twoKilometreParkList);
    }

    public ParkBean() {
    }

    protected ParkBean(Parcel in) {
        this.status = in.readInt();
        this.message = in.readString();
        this.twoKilometreAwayParkList = in.readParcelable(Object.class.getClassLoader());
        this.moreParkingInfo = in.readParcelable(Object.class.getClassLoader());
        this.page = in.readParcelable(Object.class.getClassLoader());
        this.twoKilometreParkList = in.createTypedArrayList(TwoKilometreParkListBean.CREATOR);
    }

    public static final Parcelable.Creator<ParkBean> CREATOR = new Parcelable.Creator<ParkBean>() {
        @Override
        public ParkBean createFromParcel(Parcel source) {
            return new ParkBean(source);
        }

        @Override
        public ParkBean[] newArray(int size) {
            return new ParkBean[size];
        }
    };
}
